# -*- coding:utf-8 -*-
# 运算符
# + 合并 支持字符串、列表、元组

# 字符串
# var1 = "hello"
# var2 = " world"
# print(var1 + var2)   # 拼接两个字符串 # hello world

# 列表
# li1 = [1, 2, 3, 4]
# li2 = [5, 6, 7, 8]
# print(li1 + li2)     # 合并成一个列表  # [1, 2, 3, 4, 5, 6, 7, 8]

# 元组
# tu1 = (1, 2, 3)
# tu2 = (4, 5, 6)
# print(tu1 + tu2)     # 合并成一个元组   # (1, 2, 3, 4, 5, 6)


# * 复制  支持字符串、列表、元组

# 字符串
# var1 = "hello"
# print(var1 * 2)

# # 列表
# li1 = [1, 2, 3, 4]
# print(li1 * 2)

# # 元组
# tu1 = (1, 2, 3)
# print(tu1 * 2)

# print(2 * 2)    # 乘法计算


# in 和 not in 支持字符串、列表、元组、字典、集合
# 1. 字符串
# print('a' in 'abcd')        # True
# print('a' not in 'abcd')        # False
#
# # 2. 列表
# list1 = ['a', 'b', 'c', 'd']
# print('a' in list1)         # True
# print('a' not in list1)         # False
#
# # 3. 元组
# tu1 = ('a', 'b', 'c', 'd')
# print('aa' in tu1)       # False
# print('aa' not in tu1)       # True

# 4.  集合
# set1 = {"姓名", "张三"}
# print("张三" in set1)      # True
# print("张三" not in set1)   # False
